package com.subaiqiao.yunshiyuan.entrance.ysy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subaiqiao.yunshiyuan.basis.service.impl.BasisServiceImpl;
import com.subaiqiao.yunshiyuan.entrance.ysy.service.ProductService;
import com.subaiqiao.yunshiyuan.entrance.ysy.pojo.Product;
import com.subaiqiao.yunshiyuan.entrance.ysy.mapper.ProductMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subaiqiao.yunshiyuan.entrance.ysy.vo.ProductVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 曹朝禹
 * @since 2022-05-13
 */
@Service
@Transactional
public class ProductServiceImpl extends BasisServiceImpl<Product, ProductMapper> implements ProductService {

    @Override
    public Page<ProductVO> FillProductPage(Page<ProductVO> page, QueryWrapper<ProductVO> wrapper) {
        return page.setRecords(baseMapper.FillProductPage(page,wrapper));
    }

    @Override
    public ProductVO FillProductDetails(QueryWrapper<ProductVO> wrapper) {
        return baseMapper.FillProductDetails(wrapper);
    }

    @Override
    public Integer FindProductCount() {
        return baseMapper.FindProductCount();
    }

    @Override
    public Integer FindInSellingGoodsCount() {
        return baseMapper.FindInSellingGoodsCount();
    }

    @Override
    public Integer FindShortageOfGoodsCount() {
        return baseMapper.FindShortageOfGoodsCount();
    }

    @Override
    public Integer FindProductCountYesterdayRegister() {
        return baseMapper.FindProductCountYesterdayRegister();
    }

    @Override
    public List<ProductVO> test() {
        return baseMapper.select_product_test_1();
    }


    @Override
    public Integer FindCount() {
        return null;
    }

    @Override
    public ProductMapper getMapper() {
        return null;
    }
}
